import { takeEvery,call,put } from "@redux-saga/core/effects";
import types from '../actionTypes'
import {getUsersAccount} from '../../api/user'
import {setAllUser} from '../actions/userAction'
function* getUsers(){
    const res= yield call(getUsersAccount)
    console.log(11111,res.data);
    yield put(setAllUser(res.data))
    
}
function* watchUsers(){
    yield takeEvery(types.GET_YONGHU_ASYNC,getUsers)
}
export default watchUsers